csd: Implement middle-click action for titlebar
authorMatthias Clasen <mclasen@redhat.com>
Tue, 13 Aug 2013 22:24:37 +0000 (18:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 13 Aug 2013 22:24:37 +0000 (18:24 -0400)
The default middle-click action on the titlebar should be to lower
the window. Implement that.

https://bugzilla.gnome.org/show_bug.cgi?id=705809

gtk/gtkwindow.c

index a74ab7e995350232c29af5812de806d2e1288b86..1210acf4910934f99afa6c8f92a31efc3c0c6786 100644 (file)
@@ -7179,6 +7179,13 @@ gtk_window_button_press_event (GtkWidget      *widget,
                   return TRUE;
                 }
             }
+          else if (event->button == GDK_BUTTON_MIDDLE)
+            {
+              if (region == GTK_WINDOW_REGION_TITLE)
+                {
+                  gdk_window_lower (gtk_widget_get_window (GTK_WIDGET (window)));
+                }
+            }
         }
       else if (event->type == GDK_2BUTTON_PRESS)
         {